LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL;

ENTITY FnDecoder IS
	PORT (
		--2 switch input
		UCP : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
		--the chosen hand of player 0
		F0 : OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
		--the chosen hand of player 1
		F1 : OUT STD_LOGIC_VECTOR(1 DOWNTO 0));
END FnDecoder;

ARCHITECTURE archFnDecoder OF FnDecoder IS
BEGIN
	F0 <= "00" WHEN UCP = "00" ELSE --left hand of player 0
		"00" WHEN UCP = "01" ELSE
		"01" WHEN UCP = "10" ELSE --right hand of player 0
		"01";

	F1 <= "10" WHEN UCP = "00" ELSE --left hand of player 1
		"11" WHEN UCP = "01" ELSE --right hand of player 1
		"10" WHEN UCP = "10" ELSE
		"11";

END archFnDecoder;